package com.leo.chailv.entity;

import java.io.Serializable;

public class Message<T> implements Serializable {

    private boolean flag;

    private String message;

    private T t;

    public Message(){}

    public Message(boolean flag){
        this.flag = flag;
    }

    public Message(boolean flag,String message){
        this.flag = flag;
        this.message = message;
    }

    public Message(boolean flag,String message,T t){
        this.flag = flag;
        this.message = message;
        this.t = t;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    @Override
    public String toString() {
        return "Message{" +
                "flag=" + flag +
                ", message='" + message + '\'' +
                ", t=" + t +
                '}';
    }
}
